import request from '@/config/axios'
// 需求管理/版本列表
export const getDemandList = async (params) => {
  return await request.get({ url: '/testdemand/project/version/page', params })
}
// 需求管理/新建版本
export const createDemand = async (data) => {
  return await request.post({ url: '/testdemand/project/version/create', data })
}
// 需求管理/版本修改
export const updateDemand = async (data) => {
  return await request.put({ url: '/testdemand/project/version/update', data })
}
// 需求管理/查看版本
export const getDemandView = async (params) => {
  return await request.get({ url: '/testdemand/project/version/get', params })
}
// 需求管理/删除版本
export const deleteDemand = async (data) => {
  return await request.delete({ url: '/testdemand/project/version/delete?id=' + data.id })
}
// 需求管理/版本发布
export const releaseDemand = async (data) => {
  return await request.put({ url: '/testdemand/project/version/release?id=' + data.id  })
}
// 需求项管理/获取需求功能点树
export const getDemandTree = async (params) => {
  return await request.get({ url: '/testdemand/project/demand/tree', params })
}
// 需求项管理/新建需求功能点
export const createDemandTree = async (data) => {
  return await request.post({ url: '/testdemand/project/demand/create', data })
}
// 需求项管理/更新需求功能点
export const updateDemandTree = async (data) => {
  return await request.put({ url: '/testdemand/project/demand/update', data })
}
// 需求项管理/获取需求功能点详情
export const getDemandInfo = async (params) => {
  return await request.get({ url: '/testdemand/project/demand/get', params })
}
// 需求项管理/删除需求功能点
export const deleteDemandTree = async (data) => {
  return await request.delete({ url: '/testdemand/project/demand/delete?id=' + data.id })
}
// 项目成员/获取项目开发人员
export const getProjectDevMember = async (params) => {
  return await request.get({ url: '/project/member/developers', params })
}
// 获取需求状态
export const getDemandStatus = async () => {
  return await request.get({ url: '/testdemand/project/demand/status' })
}
// 获取人员在项目中的角色
export const getProjectMemberRole = async (params) => {
  return await request.get({ url: '/project/member/role', params })
}
